package com.bltec.emergency.service.resService.impl;

import com.bltec.emergency.mapper.ResSuppliesMapper;
import com.bltec.emergency.model.ResSupplies;
import com.bltec.emergency.service.resService.ResSuppliesService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class ResSuppliesServiceImpl implements ResSuppliesService {
    @Resource
    private ResSuppliesMapper resSuppliesMapper;
    @Override
    public boolean add(ResSupplies resSupplies) {
        return resSuppliesMapper.insert(resSupplies);
    }

    @Override
    public boolean deleteResSuppliesById(Long id) {
        return resSuppliesMapper.setDisableById(id);
    }

    @Override
    public boolean updateResSuppliesById(ResSupplies resSupplies) {
        return resSuppliesMapper.updateResSuppliesById(resSupplies);
    }

    @Override
    public ResSupplies getResSuppliesById(Long id) {
        return resSuppliesMapper.getResSuppliesById(id);
    }

    @Override
    public List<ResSupplies> getAll() {
        return resSuppliesMapper.selectAll();
    }
}
